package com.zhouxiaoge.泛型.泛型方法类型变量的限定;

import com.zhouxiaoge.pair3.Pair;

import java.util.Calendar;
import java.util.GregorianCalendar;

/**
 * @author 周明阳
 * mail:gqzmy@outlook.com
 * 时间:2018-05-04 17:28
 */

public class LimtArrayALgTest {
    public static void main(String[] args) {
        GregorianCalendar[] birthdays = {new GregorianCalendar(1960, Calendar.DECEMBER, 9), new GregorianCalendar(1815, Calendar.DECEMBER, 10), new GregorianCalendar(1903, Calendar.DECEMBER, 3), new GregorianCalendar(1910, Calendar.JUNE, 22)};
        Pair<GregorianCalendar> minmax = ArrayAlg.minmax(birthdays);
        System.out.println("min = " + minmax.getFirst().getTime());
        System.out.println("max = " + minmax.getSecond().getTime());
    }
}
